Add various patches to integrate gpsbabelfe better into Debian.
authorBernd Zeimetz <bernd@bzed.de>
Tue, 22 Jun 2010 23:24:25 +0000 (01:24 +0200)
committerBernd Zeimetz <bernd@bzed.de>
Tue, 22 Jun 2010 23:55:20 +0000 (01:55 +0200)
- Submitting statistics data should be opt-in instead of
  activated by default
- Disable check for newer versions. apt-get/aptitude takes care of that.
- Disable check for version differences between gpsbabelfe and gpsbabel.
  The check did not work as expected and dpkg ensures there is no
  difference.

debian/patches/gpsbabelfe-name
debian/patches/gpsbabelfe_disable_version_check [new file with mode: 0644]
debian/patches/gpsbabelfe_do-not-check-for-newer-version [new file with mode: 0644]
debian/patches/gpsbabelfe_opt-in-for-usage-data-reporting [new file with mode: 0644]
debian/patches/series

index a95fe639ac88d0e36fa103b039898891b0ac1810..841bb093b225318f5136e7b4fa0e26dfa1fec5ec 100644 (file)
@@ -1,3 +1,4 @@
+Rename gpsbabelfe binary.
 --- a/gui/app.pro
 +++ b/gui/app.pro
 @@ -26,7 +26,7 @@ RESOURCES = app.qrc
diff --git a/debian/patches/gpsbabelfe_disable_version_check b/debian/patches/gpsbabelfe_disable_version_check
new file mode 100644 (file)
index 0000000..33b8633
--- /dev/null
@@ -0,0 +1,62 @@
+Disable version mismatch check.
+
+--- a/gui/mainwindow.cpp
++++ b/gui/mainwindow.cpp
+@@ -198,12 +198,6 @@ MainWindow::MainWindow(QWidget* parent):
+                              allowBetaUpgrades());
+   }
+-  if (!bd.ignoreVersionMismatch && babelVersion != VERSION) {
+-    VersionMismatch vm(0, babelVersion, QString(appName) + QString(" Version " VERSION));
+-
+-    vm.exec();
+-    bd.ignoreVersionMismatch = vm.neverAgain();
+-  }
+ }
+ //------------------------------------------------------------------------
+--- a/gui/preferences.ui
++++ b/gui/preferences.ui
+@@ -53,13 +53,6 @@
+           </property>
+          </widget>
+         </item>
+-        <item>
+-         <widget class="QCheckBox" name="ignoreVersionMismatchCheck">
+-          <property name="text">
+-           <string>Ignore mismatch between command line and GUI version.</string>
+-          </property>
+-         </widget>
+-        </item>
+        </layout>
+       </widget>
+      </widget>
+--- a/gui/preferences.cpp
++++ b/gui/preferences.cpp
+@@ -40,7 +40,6 @@ Preferences::Preferences(QWidget* parent
+   ui_.startupCheck->setChecked(bd_.startupVersionCheck);
+   ui_.reportStatisticsCheck->setChecked(bd_.reportStatistics);
+-  ui_.ignoreVersionMismatchCheck->setChecked(bd_.ignoreVersionMismatch);
+   connect (ui_.buttonBox, SIGNAL(accepted()), this, SLOT(acceptClicked()));
+   connect (ui_.buttonBox, SIGNAL(rejected()), this, SLOT(rejectClicked()));
+@@ -80,7 +79,6 @@ void Preferences::acceptClicked()
+   bd_.startupVersionCheck = ui_.startupCheck->isChecked();
+   bd_.reportStatistics = ui_.reportStatisticsCheck->isChecked();
+-  bd_.ignoreVersionMismatch = ui_.ignoreVersionMismatchCheck->isChecked();
+   accept();
+ }
+--- a/gui/babeldata.h
++++ b/gui/babeldata.h
+@@ -66,7 +66,7 @@ public:
+     startupVersionCheck(true),
+     reportStatistics(true),
+     allowBetaUpgrades(false),
+-    ignoreVersionMismatch(false),
++    ignoreVersionMismatch(true),
+     disableDonateDialog(false),
+     donateSplashed(QDateTime(QDate(2010, 1, 1), QTime(0, 0, 0)))
+   {
diff --git a/debian/patches/gpsbabelfe_do-not-check-for-newer-version b/debian/patches/gpsbabelfe_do-not-check-for-newer-version
new file mode 100644 (file)
index 0000000..fff4308
--- /dev/null
@@ -0,0 +1,79 @@
+Disable check for newer versions on start.
+
+--- a/gui/preferences.ui
++++ b/gui/preferences.ui
+@@ -40,13 +40,6 @@
+        </property>
+        <layout class="QVBoxLayout" name="verticalLayout_4">
+         <item>
+-         <widget class="QCheckBox" name="startupCheck">
+-          <property name="text">
+-           <string>Check for newer version on start.</string>
+-          </property>
+-         </widget>
+-        </item>
+-        <item>
+          <widget class="QCheckBox" name="reportStatisticsCheck">
+           <property name="text">
+            <string>Anonymously report usage data.</string>
+--- a/gui/preferences.cpp
++++ b/gui/preferences.cpp
+@@ -38,7 +38,6 @@ Preferences::Preferences(QWidget* parent
+ {
+   ui_.setupUi(this);
+-  ui_.startupCheck->setChecked(bd_.startupVersionCheck);
+   ui_.reportStatisticsCheck->setChecked(bd_.reportStatistics);
+   connect (ui_.buttonBox, SIGNAL(accepted()), this, SLOT(acceptClicked()));
+@@ -77,7 +76,6 @@ void Preferences::acceptClicked()
+     formatList_[i].setHidden(item->checkState() == Qt::Unchecked);
+   }
+-  bd_.startupVersionCheck = ui_.startupCheck->isChecked();
+   bd_.reportStatistics = ui_.reportStatisticsCheck->isChecked();
+   accept();
+ }
+--- a/gui/babeldata.h
++++ b/gui/babeldata.h
+@@ -63,7 +63,7 @@ public:
+     upgradeErrors(0),
+     upgradeOffers(0),
+     runCount(0),
+-    startupVersionCheck(true),
++    startupVersionCheck(false),
+     reportStatistics(false),
+     allowBetaUpgrades(false),
+     ignoreVersionMismatch(true),
+--- a/gui/mainwinui.ui
++++ b/gui/mainwinui.ui
+@@ -641,7 +641,6 @@
+     <addaction name="actionHelp"/>
+     <addaction name="separator"/>
+     <addaction name="actionAbout"/>
+-    <addaction name="actionUpgradeCheck"/>
+    </widget>
+    <addaction name="menuFile"/>
+    <addaction name="menuHelp"/>
+@@ -667,11 +666,6 @@
+     <string>Preferences...</string>
+    </property>
+   </action>
+-  <action name="actionUpgradeCheck">
+-   <property name="text">
+-    <string>Check for Upgrade</string>
+-   </property>
+-  </action>
+  </widget>
+  <resources>
+   <include location="app.qrc"/>
+--- a/gui/mainwindow.cpp
++++ b/gui/mainwindow.cpp
+@@ -147,7 +147,6 @@ MainWindow::MainWindow(QWidget* parent):
+   connect(ui.actionQuit, SIGNAL(triggered()), this, SLOT(closeActionX()));
+   connect(ui.actionHelp, SIGNAL(triggered()), this, SLOT(helpActionX()));
+   connect(ui.actionAbout, SIGNAL(triggered()), this, SLOT(aboutActionX()));
+-  connect(ui.actionUpgradeCheck, SIGNAL(triggered()), this, SLOT(upgradeCheckActionX()));
+   connect(ui.actionPreferences, SIGNAL(triggered()), this, SLOT(preferencesActionX()));
+   connect(ui.inputFormatCombo,  SIGNAL(currentIndexChanged(int)),
diff --git a/debian/patches/gpsbabelfe_opt-in-for-usage-data-reporting b/debian/patches/gpsbabelfe_opt-in-for-usage-data-reporting
new file mode 100644 (file)
index 0000000..2d26f64
--- /dev/null
@@ -0,0 +1,12 @@
+Make statistics reporting an opt-in option.
+--- a/gui/babeldata.h
++++ b/gui/babeldata.h
+@@ -64,7 +64,7 @@ public:
+     upgradeOffers(0),
+     runCount(0),
+     startupVersionCheck(true),
+-    reportStatistics(true),
++    reportStatistics(false),
+     allowBetaUpgrades(false),
+     ignoreVersionMismatch(true),
+     disableDonateDialog(false),
index 2f264db6969555eb160ff311b906995a125a05b8..4532dc455af0dcd80897d9cf15d1f9e2439c5453 100644 (file)
@@ -1,2 +1,5 @@
+gpsbabelfe_disable_version_check
+gpsbabelfe_opt-in-for-usage-data-reporting
+gpsbabelfe_do-not-check-for-newer-version
 htmldoc-location
 gpsbabelfe-name